﻿@model Admin.CYT369.Com.WebBase.AccountLogin
@{
    var loginPath = string.Empty;
    var captchaPath = $"~/Account/GetCaptcha?t={DateTime.Now.Ticks}";

    var result = ViewBag.Result as Admin.CYT369.Com.WebBase.ExecuteResult;
}
@section styles{
    <link href="~/css/font-awesome-4.7.0/css/font-awesome.min.css" rel="stylesheet" />
    <link href="~/css/login.css" rel="stylesheet" />
}
@section scripts{
    <script src="~/js/Common.js" type="text/javascript"></script>
    <script src="~/js/SystemSetting.js"></script>
    <script type="text/javascript">
        function RefreshCaptchaCode(img) {
            $(img).attr("src", "@Url.Content(captchaPath)?p=" + new Date().getTime());
        }
    </script>
}

<div class="Login">
    <div class="TitleBar">
        <i class="fa fa-file-archive-o Brand"></i>
        <div class="Title">@ViewBag.SYSTEM_NAME</div>
    </div>
    <div class="Dialog">
        <form id="login_form" action="@Url.Content(loginPath)" method="post">
            <table class="Body">
                <tr class="row">
                    <td class="NH">账&nbsp;&nbsp;&nbsp;&nbsp;户：</td>
                    <td class="FH">
                        <input name="LoginName" id="LoginName" type="text" class="text" value="@(Model!=null?Model.LoginName:string.Empty)" /><br />
                    </td>
                </tr>
                <tr class="row">
                    <td class="NH">密&nbsp;&nbsp;&nbsp;&nbsp;码：</td>
                    <td class="FH">
                        <input name="Password" id="Password" type="password" class="text" value="@(Model!=null?Model.Password:string.Empty)" />
                    </td>
                </tr>
                <tr class="row">
                    <td class="NH">验证码：</td>
                    <td class="FH">
                        <input name="Captcha" id="Captcha" type="text" class="text" autocomplete="off" style="width:165px" />
                        <img id="captcha_img" src="@Url.Content(captchaPath)" class="captcha" onclick="RefreshCaptchaCode(this)" />
                    </td>
                </tr>
                <tr>
                    <td></td>
                    <td class="Error">@(result?.Msg)</td>
                </tr>
                <tr class="row">
                    <th></th>
                    <td class="FH">
                        <input id="chkRememberLoginName" type="checkbox" onclick="Login.LoginNameClick()" /><label for="chkRememberLoginName">记住账户</label>
                        <input id="chkRememberLoginPassword" type="checkbox" onclick="Login.PasswordClick()" /><label for="chkRememberLoginPassword">记住密码</label>
                    </td>
                </tr>
                <tr class="row">
                    <td></td>
                    <td class="FH">
                        <input type="submit" class="submit" value=" 登  录 " />
                    </td>
                </tr>
            </table>
        </form>
    </div>
</div>

<div class="Footer">
    <div class="Caution">温馨提示：请使用IE10及以上浏览器或者Chrome、Firefox、Microsoft Edge浏览器，推荐使用 Chrome/ 浏览器！</div>
    <div class="ICP">渝ICP98762231</div>
</div>
